package com.cnplan.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cnplan.entity.ArcRoll;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ArcRollMapper extends BaseMapper<ArcRoll> {

    @Select(value = "select * from arc_roll a INNER JOIN arc_roll_image b on a.id=b.ct_id where a.r_id= #{rId} ${gName}")
    List<ArcRoll> selectArcRoll(@Param("rId") String rId,@Param("gName") String gName);

    @Select(value = "select * from arc_roll a INNER JOIN arc_roll_image b on a.id=b.ct_id where a.id= #{id}")
    ArcRoll findArcRollId(@Param("id") String id);

    @Select(value = "select * from arc_roll where arc_num = #{arcNum} ${gName}")
    List<ArcRoll> selectArcRollData(@Param("arcNum") String arcNum,@Param("gName") String gName);

    @Select(value = "select * from arc_roll where id = #{id} limit 1")
    ArcRoll findById(@Param("id") String id);
}
